<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link href='http://fonts.googleapis.com/css?family=Quicksand' rel='stylesheet' type='text/css'>
<script type="text/javascript">
$(function(){
	$("#headSearchBtn").click(function(){
			location.href="searchProductListByName.do?name="+$("#headInfo").val();
	});
});
function enterChatRoom(){
	//${initParam.root }/startChat.do
	window.open("${initParam.root }/startChat.do","chatRoom",
	"resizable=no,toolbar=no,location=no,width=520px,height=620px,left=700,top=0");
}
</script>

<div class="header">
<a href="home.do"><img src="${initParam.root}/img/logo.jpg"></a>
	<ul id="headermenu">
		<c:choose>
			<c:when test="${sessionScope.cvo==null&&sessionScope.svo==null&&sessionScope.avo==null }">
				<li class="active_menu_item"><a href="#">LOGIN</a>
					<ul>  
                		<li><a href="${initParam.root}/consumer_login.do">MEMBER LOGIN</a></li>
                		<li><a href="${initParam.root}/admin_login.do">ADMIN LOGIN</a></li>
					</ul>
				</li>
				<li><a href="${initParam.root}/consumer_register.do">Join Us</a></li>
			</c:when>
			<c:when test="${sessionScope.cvo!=null&&sessionScope.svo==null&&sessionScope.avo==null }">
				<li><a href="${initParam.root}/logoutconsumer.do">LOGOUT</a></li>
				<li class="active_menu_item"><a href="#">MYPAGE</a>
					<ul>
    					<li><a href="${initParam.root }/consumer_info.do?id=${sessionScope.cvo.id}">MYINFO</a></li>
    					<li><a href="${initParam.root }/consumer_update.do">UPDATEINFO</a></li>
   					</ul>
   				</li>
				<li><a href="${initParam.root }/purchasePointView.do">POINT</a>
				<li><a href="${initParam.root }/getPurchaseList.do">ORDER</a></li>
				<li><a href="${initParam.root}/getCartList.do">CART</a>
				<li><a href="${initParam.root}/getQuestionBoardList.do">Q&A</a></li>
				<li><a href="${initParam.root }/askSellerView.do">판매자 신청</a></li>
				<li><a href="javascript:enterChatRoom()" target="chatRoom">채팅방입장</a></li>
			</c:when>
			<c:when test="${sessionScope.avo!=null&&sessionScope.svo==null&&sessionScope.cvo==null}">
				<li><a href="${initParam.root }/admin_login.do">ADMIN PAGE</a></li>
				<li><a href="${initParam.root }/adminLogout.do">ADMIN LOGOUT</a></li>			
			</c:when>
			<c:otherwise>
				<li><a href="${initParam.root}/logoutconsumer.do">LOGOUT</a></li>
				<li class="active_menu_item"><a href="#">MYPAGE</a>
					<ul>
    					<li><a href="${initParam.root }/consumer_info.do?id=${sessionScope.cvo.id}">MYINFO</a></li>
    					<li><a href="${initParam.root }/consumer_update.do">UPDATEINFO</a></li>
   					</ul>
   				</li>
				<li><a href="${initParam.root }/purchasePointView.do">POINT</a>
				<li><a href="${initParam.root }/getPurchaseList.do">ORDER</a></li>
				<li><a href="${initParam.root}/getCartList.do">CART</a>
				<li><a href="${initParam.root}/getQuestionBoardList.do">Q&A</a></li>
				<li><a href="${initParam.root}/seller.do">판매자 관리</a></li>
				<li><a href="javascript:enterChatRoom()" target="chatRoom">채팅방입장</a></li>
			</c:otherwise>
		</c:choose>
	</ul>
</div>


